3.223 \(\int \sqrt {a-a \sec ^2(c+d x)} \, dx\)

Optimal. Leaf size=33 \[ -\frac {\cot (c+d x) \sqrt {-a \tan ^2(c+d x)} \log (\cos (c+d x))}{d} \]

[Out]

-cot(d*x+c)*ln(cos(d*x+c))*(-a*tan(d*x+c)^2)^(1/2)/d

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 33, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {4121, 3658, 3475} \[ -\frac {\cot (c+d x) \sqrt {-a \tan ^2(c+d x)} \log (\cos (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[a - a*Sec[c + d*x]^2],x]

[Out]

-((Cot[c + d*x]*Log[Cos[c + d*x]]*Sqrt[-(a*Tan[c + d*x]^2)])/d)

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3658

Int[(u_.)*((b_.)*tan[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Di
st[((b*ff^n)^IntPart[p]*(b*Tan[e + f*x]^n)^FracPart[p])/(Tan[e + f*x]/ff)^(n*FracPart[p]), Int[ActivateTrig[u]
*(Tan[e + f*x]/ff)^(n*p), x], x]] /; FreeQ[{b, e, f, n, p}, x] &&  !IntegerQ[p] && IntegerQ[n] && (EqQ[u, 1] |
| MatchQ[u, ((d_.)*(trig_)[e + f*x])^(m_.) /; FreeQ[{d, m}, x] && MemberQ[{sin, cos, tan, cot, sec, csc}, trig
]])

Rule 4121

Int[(u_.)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Int[ActivateTrig[u*(b*tan[e + f*x]^2)^p]
, x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0]

Rubi steps

\begin {align*} \int \sqrt {a-a \sec ^2(c+d x)} \, dx &=\int \sqrt {-a \tan ^2(c+d x)} \, dx\\ &=\left (\cot (c+d x) \sqrt {-a \tan ^2(c+d x)}\right ) \int \tan (c+d x) \, dx\\ &=-\frac {\cot (c+d x) \log (\cos (c+d x)) \sqrt {-a \tan ^2(c+d x)}}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 33, normalized size = 1.00 \[ -\frac {\cot (c+d x) \sqrt {-a \tan ^2(c+d x)} \log (\cos (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a - a*Sec[c + d*x]^2],x]

[Out]

-((Cot[c + d*x]*Log[Cos[c + d*x]]*Sqrt[-(a*Tan[c + d*x]^2)])/d)

________________________________________________________________________________________

fricas [A]  time = 0.63, size = 53, normalized size = 1.61 \[ -\frac {\sqrt {\frac {a \cos \left (d x + c\right )^{2} - a}{\cos \left (d x + c\right )^{2}}} \cos \left (d x + c\right ) \log \left (-\cos \left (d x + c\right )\right )}{d \sin \left (d x + c\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a-a*sec(d*x+c)^2)^(1/2),x, algorithm="fricas")

[Out]

-sqrt((a*cos(d*x + c)^2 - a)/cos(d*x + c)^2)*cos(d*x + c)*log(-cos(d*x + c))/(d*sin(d*x + c))

________________________________________________________________________________________

giac [B]  time = 0.35, size = 141, normalized size = 4.27 \[ -\frac {{\left (\log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right ) \mathrm {sgn}\left (-\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) - \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) \mathrm {sgn}\left (-\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) - \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) \mathrm {sgn}\left (-\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )\right )} \sqrt {-a} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a-a*sec(d*x+c)^2)^(1/2),x, algorithm="giac")

[Out]

-(log(tan(1/2*d*x + 1/2*c)^2 + 1)*sgn(-tan(1/2*d*x + 1/2*c)^3 - tan(1/2*d*x + 1/2*c)) - log(abs(tan(1/2*d*x +
1/2*c) + 1))*sgn(-tan(1/2*d*x + 1/2*c)^3 - tan(1/2*d*x + 1/2*c)) - log(abs(tan(1/2*d*x + 1/2*c) - 1))*sgn(-tan
(1/2*d*x + 1/2*c)^3 - tan(1/2*d*x + 1/2*c)))*sqrt(-a)*sgn(cos(d*x + c))/d

________________________________________________________________________________________

maple [B]  time = 3.07, size = 109, normalized size = 3.30 \[ -\frac {\left (\ln \left (-\frac {-1+\cos \left (d x +c \right )+\sin \left (d x +c \right )}{\sin \left (d x +c \right )}\right )+\ln \left (-\frac {-\sin \left (d x +c \right )-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}\right )-\ln \left (\frac {2}{1+\cos \left (d x +c \right )}\right )\right ) \cos \left (d x +c \right ) \sqrt {-\frac {a \left (\sin ^{2}\left (d x +c \right )\right )}{\cos \left (d x +c \right )^{2}}}}{d \sin \left (d x +c \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a-a*sec(d*x+c)^2)^(1/2),x)

[Out]

-1/d*(ln(-(-1+cos(d*x+c)+sin(d*x+c))/sin(d*x+c))+ln(-(-sin(d*x+c)-1+cos(d*x+c))/sin(d*x+c))-ln(2/(1+cos(d*x+c)
)))*cos(d*x+c)*(-a*sin(d*x+c)^2/cos(d*x+c)^2)^(1/2)/sin(d*x+c)

________________________________________________________________________________________

maxima [A]  time = 0.44, size = 21, normalized size = 0.64 \[ \frac {\sqrt {-a} \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a-a*sec(d*x+c)^2)^(1/2),x, algorithm="maxima")

[Out]

1/2*sqrt(-a)*log(tan(d*x + c)^2 + 1)/d

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.03 \[ \int \sqrt {a-\frac {a}{{\cos \left (c+d\,x\right )}^2}} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a - a/cos(c + d*x)^2)^(1/2),x)

[Out]

int((a - a/cos(c + d*x)^2)^(1/2), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {- a \sec ^{2}{\left (c + d x \right )} + a}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a-a*sec(d*x+c)**2)**(1/2),x)

[Out]

Integral(sqrt(-a*sec(c + d*x)**2 + a), x)

________________________________________________________________________________________